{include file="public/head"}

<body>
    <div class="dressCard">
        <a href="javascript:;">
            <img src="/uploads/20190515/b9c68affb2d968ea48c90c7831efb395.png" alt="图片丢失" class="dressCard-left">
            <div class="dressCard-right">
                <div class="dressCard-right-one">
                    <span>小车C1驾照</span>
                </div>
                <div class="dressCard-right-three">
                    <div class="dressCard-right-three-left floatLeft">
                        <div class="floatLeft">
                            <span class="redCol">4</span>人团
                        </div>
                        <div class="floatLeft"></div>
                        <div class="floatLeft redCol">￥1000.00</div>
                        <div class="floatLeft">
                            差<span class="redCol">1</span>人
                        </div>
                    </div>
                </div>
            </div>
        </a>
    </div>
    <div class="group-wrap">
        <div class="group-t">团长：某某某</div>
        <img src="img/image1.png" alt="..." />
        <div class="count-down">
            还剩
            <div class="down-t" endTime="2019-06-16 23:0:0">
                <i>25</i>:<i>26</i>:<i>25</i>
            </div>
            结束，快来参团吧！
        </div>
        <div class="group-btn">点击参团</div>
    </div>
    <div class="dressCard-title">猜你喜欢</div>
    <div class="dressCard">
        <a href="/index/goods/goodsInfo?id=1">
            <img src="/static/home/img/img6.png" alt="图片丢失" class="dressCard-left" />
            <div class="dressCard-right">
                <div class="dressCard-right-one">
                    <span>小汽车自动挡</span>
                    <span>C2</span>
                </div>
                <div class="dressCard-right-two">
                    1000人已报名
                </div>
                <div class="dressCard-right-three">
                    <div class="dressCard-right-three-left floatLeft">
                        <div class="floatLeft redCol">￥3970</div>
                    </div>
                    <div class="dressCard-right-three-right floatRight">去报名</div>
                </div>
            </div>
        </a>
    </div>

    <div class="clickMore">
        查看更多
    </div>


    <script src="__STATIC__/home/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC__/home/js/swiper.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        $(function () {
            var formatNumber = n => {
                n = n.toString();
                return n[1] ? n : '0' + n;
            }
            // 倒计时
            updateEndTime();
            function updateEndTime() {
                var NowTime = new Date();
                var time = NowTime.getTime();
                $(".down-t").each(function (I) {
                    var endDate = this.getAttribute("endTime");
                    var endDate1 = eval('new Date(' + endDate.replace(/\d+(?=-[^-]+$)/, function (a) { return parseInt(a, 10) - 1; }).match(/\d+/g) + ')');
                    var endTime = endDate1.getTime();
                    var lag = Math.floor((endTime - time) / 1000);
                    //			判断计时是否停止
                    if (lag > 0) {
                        var day = Math.floor(lag / (60 * 60 * 24)); var h = Math.floor(lag / 3600); var d = Math.floor(h / 24); var m = Math.floor(lag / 60 % 60); var s = lag % 60;
                        $(this).html(`<i>${formatNumber(h)}</i>:<i>${formatNumber(m)}</i>:<i>${formatNumber(s)}</i>`);

                    } else {
                        $(this).parent('.a-f').html('拼团已结束');
                    }
                });
                setTimeout(function () {
                    updateEndTime();
                }, 1000);
            }

        });
    </script>

</body>

</html>